import request from '@/utils/request'
import Qs from 'qs'

// 优惠券
export function GetDiscountMsg(data) {
    return request({
        url: '/order/GetDiscountMsg',
        method: 'post',
        data: Qs.stringify(data)
    })
}
// 订单查询
export function GetOrder(data) {
    return request({
        url: "/order/ShowOrder",
        method: 'post',
        data: Qs.stringify(data)
    })
}

//订单提交
export function SubmitOrder(data) {
    return request({
        url: '/order/SubmitOrder',
        method: 'post',
        data: Qs.stringify(data)
    })
}
// 获取学员信息
export function GetStuInfo(data) {
    return request({
        url: '/order/ShowStudentOrder',
        method: 'post',
        data: Qs.stringify(data)
    })
}
// 编辑学员--获取已绑定学员
export function GetBindStu(data) {
    return request({
        url: '/order/LoadBindStudent',
        method: 'post',
        data: Qs.stringify(data)
    })
}
//编辑学员--新增编辑学员
export function EditStudent(data) {
    return request({
        url: '/order/EditStudentOrder',
        method: 'post',
        data: Qs.stringify(data)
    })
}
//取消订单
export function CancelOrder(data) {
    return request({
        url: '/order/CancelOrder',
        method: 'post',
        data: Qs.stringify(data)
    })
}
// 申请退款
export function RefundOrder(data) {
    return request({
        url: '/order/RefundOrder',
        method: 'post',
        data: Qs.stringify(data)
    })
}
// 获取订单详情
export function GetOrderDetail(data) {
    return request({
        url: '/personal/OrderDetails',
        method: 'post',
        data: Qs.stringify(data)
    })
}
//编辑学员--检查是否已绑定过
export function CheckBindStudent(data) {
    return request({
        url: '/order/CheckBindStudent',
        method: 'post',
        data: Qs.stringify(data)
    })
}
// 订单选择支付方式
export function ChooseMethod(data) {
    return request({
        url: '/order/ChoosePaymentMethod',
        method: 'post',
        data: Qs.stringify(data)
    })
}


/************************************职工端**********************************/
// 获取课程订单
export function getTOrders(data) {
    return request({
        url: '/Tcourse/showOrder_course',
        method: 'post',
        data: Qs.stringify(data)
    })
}

// 职工--获取收款账户
export function getReceiveQRcode(data) {
    return request({
        url: '/Tcourse/showReceive_QRcode',
        method: 'post',
        data: Qs.stringify(data)
    })
}

// 确认收款
export function receiptConfirm(data) {
    return request({
        url: '/Tcourse/MakeSure_ReceiveMoney',
        method: 'post',
        data: Qs.stringify(data)
    })
}
